package com.mycity.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.ResultSetExtractor;

import com.mycity.bean.Report;

public class ReportSetExtractor implements ResultSetExtractor<Report> {

	  @Override
	  public Report extractData(ResultSet rs) throws SQLException {
		Report Report = new Report();
		Report.setReportId(rs.getInt("reportId"));
		Report.setContentType(rs.getInt("contentType"));
		Report.setContentId(rs.getInt("contentId"));
		Report.setReporterId(rs.getInt("reporterId"));
		Report.setReportedId(rs.getInt("reportedId"));
		Report.setReportDate(rs.getString("reportDate"));
	    return Report;
	  }
}